Fluent Assertions Documentation
FluentAssertions.Equivalency Namespace / EquivalencyOptions<TExpectation> Class
Members
In This Topic
    EquivalencyOptions<TExpectation> Class
    In This Topic
    Represents the run-time type-specific behavior of a structural equivalency assertion.
    Object Model
    EquivalencyOptions<TExpectation> ClassConversionSelector ClassOrderingRuleCollection ClassITraceWriter Interface
    Syntax
    Type Parameters
    TExpectation
    Inheritance Hierarchy

    System.Object
       FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<TSelf>
          FluentAssertions.Equivalency.EquivalencyOptions<TExpectation>

    Public Constructors
     NameDescription
    Public ConstructorOverloaded.   
    Top
    Public Properties
    Public Methods
     NameDescription
    Public Method Disables limitations on recursion depth when the structural equality check is configured to include nested objects (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodCreates a new set of options based on the current instance which acts on a a collection of the TExpectation.  
    Public MethodOverloaded. Marks the T as a type that should be compared by its members even though it may override the System.Object.Equals(System.Object) method. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodOverloaded. Marks the T as a value type which must be compared using its System.Object.Equals(System.Object) method, regardless of it overriding it or not. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Causes to compare Enum properties using the result of their ToString method. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Causes to compare Enum members using their underlying value only. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodEnsures records by default are compared by their members even though they override the System.Object.Equals(System.Object) method. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Ensures records by default are compared by value instead of their members. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodOverloaded.  Excludes the specified (nested) member from the structural equality check.  
    Public Method Excludes properties that are explicitly implemented from the equivalency comparison. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Instructs the comparison to exclude fields. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Excludes the specified member(s) from the structural equality check anywhere in the object graph. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Tries to match the members of the expectation with equally named members on the subject. Ignores those members that don't exist on the subject and previously registered matching rules. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodInstructs the comparison to exclude non-browsable members in the expectation (members set to System.ComponentModel.EditorBrowsableState.Never). It is not required that they be marked non-browsable in the subject. Use SelfReferenceEquivalencyOptions<TSelf>.IgnoringNonBrowsableMembersOnSubject to ignore non-browsable members in the subject. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Instructs the comparison to exclude properties. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodSelects a collection to define exclusions at. Allows to navigate deeper by using For<TNext>.  
    Public MethodInstructs the comparison to compare strings case-insensitive. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Causes the structural equality check to ignore any cyclic references. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodInstructs the comparison to ignore leading whitespace when comparing strings. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodInstructs the comparison to ignore the newline style when comparing strings. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodInstructs the comparison to treat non-browsable members in the subject as though they do not exist. If you need to ignore non-browsable members in the expectation, use SelfReferenceEquivalencyOptions<TSelf>.ExcludingNonBrowsableMembers. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodInstructs the comparison to ignore trailing whitespace when comparing strings. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodOverloaded.  Includes the specified member in the equality check.  
    Public Method Causes inclusion of only public properties of the subject as far as they are defined on the declared type. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Causes inclusion of only public properties of the subject based on its run-time type rather than its declared type. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Instructs the comparison to include public fields. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Instructs the comparison to include public and internal fields. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Instructs the comparison to include public and internal properties. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Causes the structural equality comparison to recursively traverse the object graph and compare the fields and properties of any nested objects and objects in collections. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Instructs the comparison to include public properties. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Instructs the structural equality comparison to prefer the declared types of the members when executing assertions. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Instructs the structural equality comparison to use the run-time types of the members to drive the assertion. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Requires the subject to have members which are equally named to members on the expectation. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Returns a string that represents the current object. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodOverloaded. Overrides the comparison of subject and expectation to use provided action when the predicate is met. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Instructs the equivalency comparison to try to convert the values of matching properties before running any of the other steps. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Instructs the equivalency comparison to try to convert the value of a specific member on the expectation object before running any of the other steps. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodOverloaded. Maps a (nested) property or field of type TExpectation to a (nested) property or field of TSubject using lambda expressions.  
    Public Method Instructs the equivalency comparison to prevent trying to convert the value of a specific member on the expectation object before running any of the other steps. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Clears all matching rules, including those that were added by default. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Stops the structural equality check from recursively comparing the members of any nested objects. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Clears all selection rules, including those that were added by default. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Causes all collections - except bytes - to be compared ignoring the order in which the items appear in the expectation. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodOverloaded. Causes the collection identified by expression to be compared ignoring the order in which the items appear in the expectation.  
    Public Method Disables the strict typing requirement for all members, allowing members in the expectation to be of different types than members in the subject. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Causes all collections to be compared in the order in which the items appear in the expectation. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodOverloaded. Causes the collection identified by expression to be compared in the order in which the items appear in the expectation.  
    Public Method Causes all type comparisons to be strict, requiring exact type equality between subject and expectation. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public MethodCauses the types identified by the provided predicate to be compared using strict typing, requiring exact type equality. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Public Method Enables tracing the steps the equivalency validation followed to compare two graphs. (Inherited from FluentAssertions.Equivalency.SelfReferenceEquivalencyOptions<EquivalencyOptions<TExpectation>>)
    Top
    Extension Methods
     NameDescription
    Public Extension MethodSafely casts the specified object to the type specified through TTo.
    Public Extension MethodOverloaded. Invokes the specified action on a subject so that you can chain it with any of the assertions from FluentAssertions.Specialized.NonGenericAsyncFunctionAssertions
    Public Extension MethodOverloaded. Forces enumerating a collection. Should be used to assert that a method that uses the yield keyword throws a particular exception.
    Public Extension Method Provides methods for asserting the execution time of a method or property.
    Public Extension MethodOverloaded. Invokes the specified action on a subject so that you can chain it with any of the assertions from FluentAssertions.Specialized.ActionAssertions
    Public Extension MethodOverloaded. Starts monitoring eventSource for its events.
    Public Extension MethodOverloaded. Returns an FluentAssertions.Specialized.ExecutionTimeAssertions object that can be used to assert the current FluentAssertions.Specialized.ExecutionTime.
    Public Extension MethodOverloaded. Returns an FluentAssertions.Primitives.EnumAssertions<TEnum,TAssertions> object that can be used to assert the current TEnum.
    Top
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also